﻿@model IEnumerable<LabManagement.Data.LabUser>

<p>
    @Html.ActionLink("Create New", "Create", new { OrgId=ViewBag.Orgid})
</p>
<table>
    <tr>
        <th>
           User Name
        </th>
        <th>
            Organization
        </th>
        <th>
            @Html.DisplayNameFor(model => model.UsedMinutes)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Active)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.User.UserName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Org.OrgName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.UsedMinutes)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Active)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.LabUserId }) |
            @Html.ActionLink("Details", "Details", new { id=item.LabUserId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.LabUserId })
        </td>
    </tr>
}

</table>
